package com.website.company.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.website.company.entity.CompanyDevelopment;
import com.website.company.mapper.CompanyDevelopmentMapper;
import com.website.company.service.CompanyDevelopmentService;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.Date;

@Service
public class CompanyDevelopmentServiceImpl
        extends ServiceImpl<CompanyDevelopmentMapper, CompanyDevelopment>
        implements CompanyDevelopmentService {

    @Override
    public void add(CompanyDevelopment product) {
        product.setDevDate(new Date());
        baseMapper.insert(product);
    }

    @Override
    public void update(CompanyDevelopment product) {
        product.setDevDate(new Date());
        baseMapper.updateById(product);
    }

    @Override
    public void delete(Integer[] ids) {
        baseMapper.deleteBatchIds(Arrays.asList(ids));
    }

}
